package com.zzg.encryp;

import com.zzg.consts.Constants;

public class UsingAESUtil {
	/***
     * 使用AES加密
     * @param password
     * @param salt
     * @return
     * @throws Exception
     */
    public static String encrypt(String password,String salt)throws Exception{
        return AESUtil.encrypt(MD5Util.MD5Util(Constants.ZYD_SECURITY_KEY,salt),password);
    }

    /***
     * 使用AES解密
     * @param encryptPassword
     * @param salt
     * @return
     * @throws Exception
     */
    public static String decrypt(String encryptPassword,String salt)throws Exception{
        return AESUtil.decryt(MD5Util.MD5Util(Constants.ZYD_SECURITY_KEY,salt),encryptPassword);
    }
}
